#ifndef B_H
#define B_H

#include "Cell.h"

class State {
public:
	unordered_map<int, int>  cellMap;
	vector<Cell> blocks;
	int boardWidth;
	shared_ptr<Cell> lastMove;
	Cell *jie = nullptr;
	int result;

	State(int boardWidth, shared_ptr<Cell> lastMove);

	int xy2idx(int x, int y);

	shared_ptr<int> idx2xy(int idx);

	State clone();

	State checkPiece(int x, int y, int color);

	int placePiece(int x, int y, int color);

	bool checkEye(Cell cell);

};

#endif